﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;

namespace DomainModel
{
    [Table(Name = "vOrders")]
    public class vOrder
    {
        [Column(IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.OnInsert)]
        public Int32 OrderID { get; set; }

        [Column]
        public DateTime OrderDate { get; set; }

        [Column]
        public String UserName { get; set; }

        [Column]
        public String StatusName { get; set; }

        [Column]
        public Int32 StatusID { get; set; }

        [Column]
        public Int32 UserID { get; set; }

        [Column]
        public Int32 ManagerID { get; set; }

        [Column]
        public decimal OrderSum { get; set; }


        [Column]
        public Boolean IsPaid { get; set; }
        
        [Column]
        public DateTime DeliveryDate { get; set; }

        public vOrder()
        {
            OrderDate = DateTime.Now;
            DeliveryDate = DateTime.Parse("2222-01-01");
        }
    }
}
